package com.base.monitor.model.model.biz.cfg.vo;

import cn.hutool.core.util.StrUtil;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

/**
 * @description: 网关页面显示的数据结构
 * @author: tsing
 * @create: 2021-06-17 22:23
 */
@Data
@NoArgsConstructor
public class IndicatorCommandVo {

    private String id;
    private String indicatorName;
    private String deviceName;
    private String installPos;
    private String command;
    private Integer frequency;
    private Integer startBit;
    private String takeBit;
    private String authCode;
    private Integer serialNumber;

    public IndicatorCommandVo(IndicatorDeviceGatewayVo vo) {
        BeanUtils.copyProperties(vo, this);
        this.indicatorName = vo.getIndexName();
        this.deviceName = vo.getEqpName();
        this.installPos = vo.getEqpInstallPos();
        this.command = vo.getCommand();
        this.frequency = vo.getFrequency();
        this.id = vo.getIndexId();
    }

}
